<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2025/6/1
  Time: 下午5:07
  To change this template use File | Settings | File Templates.
<%--&ndash;%&gt;--%>
<%--<%@ page contentType="text/html;charset=UTF-8" language="java" %>--%>
<%--<html>--%>
<%--<head>--%>
<%--    <title>修改密码</title>--%>
<%--</head>--%>
<%--<body>--%>
<%--    <form action="change-password" method="post">--%>
<%--        <%--%>
<%--            String studentId = request.getParameter("studentId");--%>
<%--        %>--%>
<%--        <input type="password" name="oldpassword" placeholder="旧密码" required><br>--%>
<%--        <input type="password" name="newpassword" placeholder="新密码" required><br>--%>
<%--        <input type="password" name="newpassword2" placeholder="确认新密码" required><br>--%>
<%--        <input type="hidden" name="studentId" value="<%=studentId%>">--%>
<%--        <input type="submit" value="修改密码">--%>
<%--        <% if (request.getAttribute("error") != null) { %>--%>
<%--        <div style="color:red;"><%= request.getAttribute("error") %></div>--%>
<%--        <% } %>--%>
<%--    </form>--%>
<%--</body>--%>
<%--</html>--%>



<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>修改密码</title>
    <style>
        :root {
            --primary-color: #4361ee;
            --secondary-color: #3a0ca3;
            --error-color: #f72585;
            --light-color: #f8f9fa;
            --border-radius: 8px;
            --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        body {
            background-color: #f5f7ff;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 20px;
        }

        .password-form-container {
            width: 100%;
            max-width: 400px;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 40px;
        }

        .form-title {
            color: var(--primary-color);
            text-align: center;
            margin-bottom: 30px;
            font-size: 24px;
            font-weight: 600;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-input {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #e0e7ff;
            border-radius: var(--border-radius);
            font-size: 16px;
            transition: var(--transition);
        }

        .form-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        .form-input::placeholder {
            color: #aaa;
        }

        .submit-btn {
            width: 100%;
            padding: 14px;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius);
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            margin-top: 10px;
        }

        .submit-btn:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
        }

        .error-message {
            color: var(--error-color);
            text-align: center;
            margin-top: 20px;
            padding: 10px;
            background: rgba(247, 37, 133, 0.1);
            border-radius: var(--border-radius);
        }
    </style>
</head>
<body>
<div class="password-form-container">
    <h1 class="form-title">修改密码</h1>
    <form action="change-password" method="post">
        <%
            String studentId = request.getParameter("studentId");
        %>
        <div class="form-group">
            <input type="password" name="oldpassword" class="form-input" placeholder="旧密码" required>
        </div>
        <div class="form-group">
            <input type="password" name="newpassword" class="form-input" placeholder="新密码" required>
        </div>
        <div class="form-group">
            <input type="password" name="newpassword2" class="form-input" placeholder="确认新密码" required>
        </div>
        <input type="hidden" name="studentId" value="<%=studentId%>">
        <button type="submit" class="submit-btn">修改密码</button>
        <% if (request.getAttribute("error") != null) { %>
        <div class="error-message"><%= request.getAttribute("error") %></div>
        <% } %>
    </form>
</div>
</body>
</html>